<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编辑合同信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="{{asset('layui/css/layui.css')}}" media="all">
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
    <script type="text/javascript" src="{{asset('Jquery/jquery-3.3.1.js')}}"></script>
</head>
<body>
<script src="{{asset('layui/layui.js')}}"></script>
<form  class="layui-form" action="{{url('updateContract')}}" method="post">
    @csrf
    <input type="hidden" name="id" value="{{$contractInfo->id}}">
    <table class="layui-table">
        <thead>
        <tr>
            <th colspan="4" style="font-size: 18px;text-align: center;color:#666666">编辑合同信息</th>
        </tr>
        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px;width: 150px">
                <label >所属房屋编号:</label>
            </th>

            <th style="width: 400px" colspan="3">
                <div>
                    <input type="text" name="levy_house_num" readonly  value="{{ $contractInfo->houses->levy_house_num }}" lay-verify="required" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>

            </th>
        </tr>
        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label>补偿方式:</label></th>
            <th colspan="3">
                <div class="layui-inline">
                    <select name="repay_type" lay-filter="select" id="type" required>
                        <option value="">请选择补偿方式</option>
                            <option value="货币补偿" @if($contractInfo->repay_type == '货币补偿') selected @endif>货币补偿</option>
                            <option value="产权置换" @if($contractInfo->repay_type == '产权置换') selected @endif>产权置换</option>
                    </select>
                </div>
                <div>
                    @if($errors->has('repay_type'))
                        <span class="s3"><i class="red">*</i>  <sapn id="cellphone_point" style="color: red">{{$errors->first('repay_type')}}</sapn></span>
                    @endif
                </div>
            </th>
        </tr>
        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px">
                <label>还建房屋地址:</label>
            </th>
            <th colspan="3">
                <div>
                    <input type="text" name="repay_house_address" required  lay-verify="required" value="{{ $contractInfo->repay_house_address}}" placeholder="请输入偿还房屋地址" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
                <div>
                    @if($errors->has('repay_house_address'))
                        <span class="s3"><i class="red">*</i>  <sapn id="cellphone_point" style="color: red">{{$errors->first('repay_house_address')}}</sapn></span>
                    @endif
                </div>
            </th>
        </tr>
        <tr>
            <div >
                <th style="text-align: center;color:#666666;font-size: 14px">
                    <label >偿还面积(㎡):</label>
                </th>
                <th>
                    <div>
                        <input type="text" name="repay_built_area" required  value="{{ $contractInfo->repay_built_area }}" lay-verify="required" placeholder="请输入偿还面积，如：600" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                    </div>
                    <div>
                        @if($errors->has('repay_built_area'))
                            <span class="s3"><i class="red">*</i>  <sapn id="cellphone_point" style="color: red">{{$errors->first('repay_built_area')}}</sapn></span>
                        @endif
                    </div>
                </th>
            </div>
        </tr>
        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >偿还金额(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="repay_money" required  value="{{ $contractInfo->repay_money }}" lay-verify="required" placeholder="请输入偿还金额，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
                <div>
                    @if($errors->has('repay_money'))
                        <span class="s3"><i class="red">*</i>  <sapn id="cellphone_point" style="color: red">{{$errors->first('repay_money')}}</sapn></span>
                    @endif
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >房屋价值补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="house_money"  value="@if($contractInfo->details){{ $contractInfo->details->house_money }}@endif"  placeholder="请输入房屋价值补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >未经登记价值补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="unregistered_money"  value="@if($contractInfo->details){{ $contractInfo->details->unregistered_money }}@endif"  placeholder="未经登记价值补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >装修补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="decorate_money"  value="@if($contractInfo->details){{ $contractInfo->details->decorate_money }}@endif"  placeholder="装修补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >临时安置补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="resettlement_money"  value="@if($contractInfo->details){{ $contractInfo->details->resettlement_money }}@endif"  placeholder="临时安置补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >搬迁补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="removal_money"  value="@if($contractInfo->details){{ $contractInfo->details->removal_money }}@endif"  placeholder="搬迁补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >房屋附属设施补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="house_facilities_money"  value="@if($contractInfo->details){{ $contractInfo->details->house_facilities_money }}@endif"  placeholder="房屋附属设施补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >水表补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="water_meter_money"  value="@if($contractInfo->details){{ $contractInfo->details->water_meter_money }}@endif"  placeholder="水表补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >电表补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="electric_mete_money"  value="@if($contractInfo->details){{ $contractInfo->details->electric_mete_money }}@endif"  placeholder="电表补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >有线电视补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="cable_tv_money"  value="@if($contractInfo->details){{ $contractInfo->details->cable_tv_money }}@endif"  placeholder="有线电视补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >空调补偿费(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="air_conditioning_money"  value="@if($contractInfo->details){{ $contractInfo->details->air_conditioning_money }}@endif"  placeholder="空调补偿费，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >太阳能热水器补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="solar_water_heater"  value="@if($contractInfo->details){{ $contractInfo->details->solar_water_heater }}@endif"  placeholder="太阳能热水器补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >电热水器补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="electric_water_heater"  value="@if($contractInfo->details){{ $contractInfo->details->electric_water_heater }}@endif"  placeholder="电热水器补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >构筑物补偿(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="structures_money"  value="@if($contractInfo->details){{ $contractInfo->details->structures_money }}@endif"  placeholder="构筑物补偿，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >建筑面积补助(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="built_area_money"  value="@if($contractInfo->details){{ $contractInfo->details->built_area_money }}@endif"  placeholder="建筑面积补助，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >产权调换补助(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="equity_replace_money"  value="@if($contractInfo->details){{ $contractInfo->details->equity_replace_money }}@endif"  placeholder="产权调换补助，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >生活困难补助(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="life_money"  value="@if($contractInfo->details){{ $contractInfo->details->life_money }}@endif"  placeholder="生活困难补助，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >签约搬迁奖励(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="remova_reward"  value="@if($contractInfo->details){{ $contractInfo->details->remova_reward }}@endif"  placeholder="签约搬迁奖励，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >经营性补助(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="operational_money"  value="@if($contractInfo->details){{ $contractInfo->details->operational_money }}@endif"  placeholder="经营性补助，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >“住改商”(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="housing_to_business"  value="@if($contractInfo->details){{ $contractInfo->details->housing_to_business }}@endif"  placeholder="“住改商”，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >可产权调换的面积（㎡）(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="equity_replace_area"  value="@if($contractInfo->details){{ $contractInfo->details->equity_replace_area }}@endif"  placeholder="可产权调换的面积（㎡），如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>

        <tr>
            <th style="text-align: center;color:#666666;font-size: 14px"><label >应补（收）金额(¥)：</label></th>
            <th>
                <div>
                    <input type="text" name="receivable_money"  value="@if($contractInfo->details){{ $contractInfo->details->receivable_money }}@endif"  placeholder="应补（收）金额，如：24000.65" autocomplete="off" class="layui-input" style="width:400px; height:30px;" >
                </div>
            </th>
        </tr>


        <tr>
            <th colspan="4" style="color:deeppink;font-size: 25px;text-align: center">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="">确认修改</button>
                    </div>
                </div>
            </th>
        </tr>
        </div>
        </thead>
    </table>
</form>
<div class="layui-form-item"><input type="hidden" id="promptMessage" name="promptMessage" value="{{Session::get('status')}}"></div>

</div>
{{--添加成功后的提示信息--}}
<script>
    layui.use(['layer'],function(){
        var layer=layui.layer;
        var msg=$("#promptMessage").val();
        if(msg!=""){
            layer.msg(msg);
        }
    });

    layui.use('form', function () {
        var form = layui.form;
    });
</script>

</body>
</html>